package com.nuhu.service.impl;

import com.nuhu.dao.UserDao;
import com.nuhu.dao.admin_Search_HUAFEIDAO;
import com.nuhu.pojo.ComplaintRecord;
import com.nuhu.pojo.User;
import com.nuhu.service.admin_searchUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class admin_searchUserServiceImpl implements admin_searchUserService {


    @Autowired
    private admin_Search_HUAFEIDAO userDao;

    @Override
    public User getUserByPhoneNumber(String phoneNumber) {
        return userDao.getUserByPhoneNumber(phoneNumber);
    }

    @Override
    public List<User> getBannedUser(int page, int size) {
        int offset = (page - 1) * size;
        return userDao.getBannedUser(offset,size);
    }

    @Override
    public User updateBan(String phoneNumber) {
        return userDao.updateBan(phoneNumber);
    }

    @Override
    public List<ComplaintRecord> getFanKui(int page, int size) {
        return userDao.getFanKui(page,size);
    }


}
